<template>
  <div class="dashboard-container">
    <div class="dashboard-text">欢迎您: {{ list.name }}</div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import * as teacher from '@/api/adm/teacherAdmin'

export default {
  name: 'Dashboard',
  data() {
    return {
      list: null, // 查询之后接口返回集合

    }
  },
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  created() {
    this.getList()
  },
  methods: {
    getList(){
      teacher.getName().then(response => {
        this.list = response.data.list
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
